package org.xmlrpc;

import java.util.ArrayList;

/**
 * @author Open Source
 * Describes/builds a method call
 */
public class MethodCall {

	private static final int TOPIC = 1;
	String methodName;
	ArrayList<Object> params = new ArrayList<Object>();
	
	/**
	 * @return The name of the method
	 */
	public String getMethodName() { return methodName; }
	/**
	 * @param methodName The name of the method
	 */
	void setMethodName(String methodName) { this.methodName = methodName; }

	/**
	 * @return The parameters of the method call
	 */
	public ArrayList<Object> getParams() { return params; }
	/**
	 * @param params The parameters of the method call
	 */
	void setParams(ArrayList<Object> params) { this.params = params; }

	/**
	 * @return The topic
	 */
	public String getTopic() {
		return (String)params.get(TOPIC);
	}
}
